class A {
    public n: number;
    public n2: number = 2;

    public fA() {
        console.log('FA');
    }
}

class B extends A{
    public bn: number;
    public bn2: number;

    public fB(){
        console.log('FB');
    }
}

const a = new A();
const b = new B();

a.fA();
b.fB();